#!/usr/local/bin/python3
# -*- coding: UTF-8 -*-
"""
@author:apple
@file:demo01.py
@time:2022/03/11
"""
import time
from  selenium.webdriver import Chrome
from selenium.webdriver.common import by


web = Chrome()

web.get("http://www.baidu.com")

# //*[@id="kw"]

# web.find_element()
# web.find_element_by_xpath()

time.sleep(2)

input = web.find_element(by=by.By.XPATH,value="//*[@id=\"kw\"]")
input.send_keys("tony")

time.sleep(1)
web.find_element(by=by.By.XPATH,value="//*[@id=\"su\"]").click()


if __name__ == '__main__':
    pass
